//
//  downItem.h
//  demo
//
//  Created by james on 15/7/20.
//
//

#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, DownloadState)  {
    DownloadState_beign = 1,		/* 0..127 only */
    DownloadState_start = 1 << 1,
    DownloadState_connect = 1 << 2,
    DownloadState_receivedData = 1 << 3,
    DownloadState_finished = 1 << 4,
    DownloadState_paused = 1 << 5,
   
};

@interface downItem : NSObject
@property (nonatomic,strong) NSString *id;
@property (nonatomic,strong) NSString *url;
@property (nonatomic,assign) DownloadState state;
@property (nonatomic,strong) NSDictionary* options;
@property (nonatomic,strong) NSString *filename;
-(void)abort;
-(void)addListen:(DownloadState)state;
-(void)pause;
-(void)resume;
-(void)start;

@end
